<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><%=title%>- Microblog</title>
    <style type="text/css">
        /*body{
        padding-top:60px;
        padding-bottom:40px;
         }*/
    </style>
    <link rel="stylesheet" href="/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<nav class="navbar navbar-inverse" role="navigation">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">Microblog</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="active"><a href="/">首页</a></li>
                <% if(!locals.user) { %>
                <li><a href="/login">登录</a></li>
                <li><a href="/reg">注册</a></li>
                <%} else {%>
                <li><a href="/logout">登出</a></li>
                <% } %>
            </ul>
        </div>
    </div>
</nav>

<div id="container" class="container">
    <% if (locals.success) {%>
    <div class="alert alert-success">
        <%= success%>
    </div>
    <%}%>
    <% if (locals.error) {%>
    <div class="alert alert-danger">
        <%= error %>
    </div>
    <%}%>